projects
/
ostree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7baa600
)
libostree/upgrader: Throw an error if osname is empty
author
Colin Walters
<walters@verbum.org>
Tue, 25 Mar 2014 19:47:20 +0000
(15:47 -0400)
committer
Colin Walters
<walters@verbum.org>
Tue, 25 Mar 2014 19:47:20 +0000
(15:47 -0400)
This shouldn't happen; I'm just adding the check to force a rebuild.
src/libostree/ostree-sysroot-upgrader.c
patch
|
blob
|
history
diff --git
a/src/libostree/ostree-sysroot-upgrader.c
b/src/libostree/ostree-sysroot-upgrader.c
index c565434f346ce8ecb3959f7582081acecdb92807..573d3d2dae99f6a7ebfce512a9a9a93e1e0bac4e 100644
(file)
--- a/
src/libostree/ostree-sysroot-upgrader.c
+++ b/
src/libostree/ostree-sysroot-upgrader.c
@@
-115,6
+115,12
@@
ostree_sysroot_upgrader_initable_init (GInitable *initable,
g_assert (booted_deployment);
self->osname = g_strdup (ostree_deployment_get_osname (booted_deployment));
}
+ else if (self->osname[0] == '\0')
+ {
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ "Invalid empty osname");
+ goto out;
+ }
self->merge_deployment = ostree_sysroot_get_merge_deployment (self->sysroot, self->osname);
if (self->merge_deployment == NULL)